Many operating systems, such as Apple iOS APPLE IOS®, GOOGLE® ANDROID® and MICROSOFT® WINDOWS®, support multitasking features that allow multiple applications to run and perform tasks simultaneously. Each of these multiple applications may have one or more states. For example, application states for iOS applications include “not running” (the application has not been launched or was terminated by the system), “inactive” (the application is running in the foreground but is currently not receiving events), “active” (the application is running in the foreground and is receiving events), “background” (the application is in the background and executing code), and “suspended” (the application is in the background but is not executing code). Examples of events that an active application may receive include notifications of user actions that manipulate the hardware of the device, such as touch events (triggered, e.g., when a user touches the touchscreen of the device), motion events (triggered, e.g., when a user moves the device), accelerometer events (triggered, e.g., when the accelerometer or gyroscope of the device sense changes) remote control events (triggered, e.g., when a user uses an external accessory to send remote control events to the device, such as by adjusting the volume through a headset).
In various scenarios, applications may transition from the foreground to the background or vice versa. For example, on an IOS® device, a foreground application may transition to the inactive state and then the background state when the user presses the Home button on the device, when the user presses the Sleep/Wake button on the device, or when the operating system launches another application. Additionally, a background application may transition to the foreground when a user makes a request (e.g., by selecting the application from a list of background applications presented in a multitasking user interface).